import axios from '@/utils/axios';
//  投票活动列表
export const getVotePage = data => axios.post('/bnd-benefits/vote/getVotePage', data);
// 新增投票活动
export const voteAdd = data => axios.post('/bnd-benefits/vote/save', data);
// 查看投票活动详情
export const checkVoteDetail = data => axios.get(`/bnd-benefits/vote/selectOne/${data.id}`);
// 删除投票活动
export function voteDelete(data) {
  return axios.request({
    url: `/bnd-benefits/vote/delete/${data.id}`,
    method: 'delete',
    data: data,
  });
}
// 复制投票活动
export const voteCopy = data => axios.get(`/bnd-benefits/vote/copy/${data.id}`);
// 编辑投票活动
export function voteEdit(data) {
  return axios.request({
    url: '/bnd-benefits/vote/edit',
    method: 'put',
    data: data,
  });
}
// 导出投票参与人列表
export const voteExptUserList = data =>
  axios.get(`/bnd-benefits/vote/exportUserList/${data.id}`, null, {
    responseType: 'blob',
  });
// 投票活动发送薪友
export const voteSentTickets = data => axios.post('/bnd-benefits/vote/sentTickets', data);

// 报名活动列表
export const getSignPage = data =>
  axios.post('/bnd-benefits/applyActivity/getApplyActivityPage', data);

// 查看报名活动详情
export const checkSignDetail = data =>
  axios.get(`/bnd-benefits/applyActivity/selectOne/${data.id}`);

// 复制报名活动
export const signCopy = data => axios.get(`/bnd-benefits/applyActivity/copy/${data.id}`);

// 删除报名活动
export function signDelete(data) {
  return axios.request({
    url: `/bnd-benefits/applyActivity/delete/${data.id}`,
    method: 'delete',
    data: data,
  });
}
// 新增报名活动
export const signAdd = data => axios.post('/bnd-benefits/applyActivity/save', data);
// 导出报名参与人列表
export const signExptUserList = data =>
  axios.get(`/bnd-benefits/applyActivity/exportUserList/${data.id}`, null, {
    responseType: 'blob',
  });
// 编辑报名活动
export function signEdit(data) {
  return axios.request({
    url: '/bnd-benefits/applyActivity/edit',
    method: 'put',
    data: data,
  });
}
// 报名活动发送薪友
export const signSentTickets = data => axios.post('/bnd-benefits/applyActivity/sentTickets', data);
